<?php

abstract class ACoreDb
{
	#<editor-fold defaultstate="collapsed" desc="protected">
	/**
	 * @var	resource
	 */
	protected $rConnect;
	
	/**
	 * @var	resource
	 */
	protected $rResult;
	
	/**
	 * @var	ACoreDbConfig
	 */
	protected $oConfig;

	/**
	 * @var	CCoreBaseDevelopments
	 */
	protected $oDevelopments;
	#</editor-fold>
	
	/**
	 * @param	ACoreDbConfig			$oCoreDbConfig
	 * @param	CCoreBaseDevelopments	$oBaseDevelopments
	 * @return	ACoreDb
	 */
	public function __construct(ACoreDbConfig $oCoreDbConfig, CCoreBaseDevelopments $oBaseDevelopments)
	{
		CCore::CheckTypes(array('$oCoreDbConfig', '$oLogger'));

		$this->oConfig = $oCoreDbConfig;
		$this->oDevelopments = $oBaseDevelopments;
		$this->rResult = null;
		$this->rConnect = null;
	}
	
	/**
	 * @return	bool
	 */
	public function IsConnected()
	{
		return is_resource($this->rConnect);
	}
}